-- CALC_ARTIFACT_UPGRADE_CORRECT_COST

-- 神器升级修正消耗（遗物可替换成同系碎片消耗）
return function(classId, scrapId, scrapCost)
    local haveAmout = ItemM.getAmount(ME.user, scrapId)
    if haveAmout >= scrapCost then
        return {{1, scrapId, scrapCost}};
    end

    -- 获得当前系别遗物
    local relicId = ArtifactM.getRelicIdByArtifact(classId);
    return {{1, scrapId, haveAmout}, {1, relicId, scrapCost - haveAmout}};
end